package com.baitengsoft.patentapimonitor.api.dao;

import com.baitengsoft.patentapimonitor.api.entity.CfgDictionaryEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by Admin on 2018/1/8.
 */
@Mapper
public interface CfgDictionaryDao extends BasetkRepository<CfgDictionaryEntity>{

    List<CfgDictionaryEntity> searchDictionaryByCode(String code);


    /**
     * 根据名字和编码查询value
     */
    String getValueByCodeAndName(@Param("code") String code,@Param("name") String name);

    /**
     * 根据value和编码查询name
     */
    String getNameByCodeAndValue(@Param("code") String code,@Param("values") String value);
}
